import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        ArrayList<String> array = new ArrayList<>();

        char [] ch = str.toCharArray();
        int n = str.length();
        String[] str1 = new String[n];

        int t = 0;

        for ( int i = 0; i < n; i++){
            if (ch[i] >= '1' && ch[i] <= '9'){
                ch[i] = '0';
            }
            str1[i] = String.valueOf(ch[i]);
            if (str1[i].charAt(0) != '0'){
                array.add(str1[i]);
                t++;
            }
        }

        for (int i = t - 1; i >=0; i--){
            System.out.print(array.get(i));
        }

    }
}
